{%  extends "::main.html.twig" %}

{% block javascripts %}
    {#Вконтакте Like #}
    <script type="text/javascript" src="//vk.com/js/api/openapi.js?97"></script>
    <script type="text/javascript">
        VK.init({apiId: '4090655', onlyWidgets: true});
        VK.Widgets.Like("vk_like", {type: "button"});
    </script>
    {#Однокласники Like #}
    <script type="text/javascript">
        !function (d, id, did, st) {
            var js = d.createElement("script");
            js.src = "http://connect.ok.ru/connect.js";
            js.onload = js.onreadystatechange = function () {
                if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
                    if (!this.executed) {
                        this.executed = true;
                        setTimeout(function () {
                            OK.CONNECT.insertShareWidget(id, did, st);
                        }, 0);
                    }
                }
            };
            d.documentElement.appendChild(js);
        }(document, "ok_shareWidget", "http://iaccepteuromaidan.net/", "{width:190,height:30,st:'rounded',sz:20,ck:2}");
    </script>
    {#facebook Like #}
    <script>
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s);
            js.id = id;
            js.src = "//connect.facebook.net/ru_RU/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
    </script>
    {#Twitter Like #}
    <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
    {#Google+ Like#}
    <script type="text/javascript">
        window.___gcfg = {lang: 'ru'};
        (function () {
            var po = document.createElement('script');
            po.type = 'text/javascript';
            po.async = true;
            po.src = 'https://apis.google.com/js/platform.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(po, s);
        })();
    </script>

{% endblock %}

{% block steps %}
    <div id="p1" class="item active"><span>1</span>{{ 'Login by facebook'|trans }}</div>
    <div id="p2" class="item active"><span>2</span>{{ 'Click i agree'|trans }}</div>
    <div id="p3" class="item active"><span>3</span>{{ 'Say to all'|trans }}</div>
{% endblock %}

{% block content %}
    <div class="footer">
        <div class="step3">
            <div class="success">
                <p>
                    {{ 'thanks'|trans }}
                    {% if (app.user.firstname and app.user.lastname) %}
                        <strong>{{ app.user.firstname }} {{ app.user.lastname }}</strong>!
                    {% else %}
                        <strong>{{ app.user.username }}</strong>!
                    {% endif %}
                    <br/>
                    {{ 'with you'|trans }} 
                    <span class="blue">{{ 'euro'|trans }}</span>
                    <span class="yellow">{{ 'maidan'|trans }}</span> 
                    {{ 'today people'|trans }}
                </p>
                <div class="dijit">{{ todayVotes }}</div>
                <span class="people">{{ 'people'|trans }}</span>
            </div>
            <div class="buttons">
                {% include "::_share_buttons.html.twig" %}
            </div>
        </div>
    </div>
{% endblock %}
